list1=[1,21,31,4,1,2,1,3]


for a in list1:
    if a==3:
        print("3在里面")
        break
    # else:
    #     print("if的3不在里面")

else:
    print("for的3不在里面")